All Functions Used So Far, Week 2

chisq.test

{stats}

Chi-Squared test (e.g. for cross-tabulations)

ifelse

{base}

Return a or b depending on the value of test

library

{base}

Load an R package

setwd

{base}

Set Working Directory

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

mutate

{dplyr}

Modify/create a column in a data frame

with

{base}

evaluate expression in the context of a data frame

ordered

{dplyr}

Create an ordered factor

summary

{base}

Obtain summary statistics or detailed regression output

cut

{base}

Convert Numeric to Factor

read_dta

{haven}

Read a .dta file (Stata data)

t.test

{stats}

Performs one and two sample t-tests on vectors of data.

prop.test

{stats}

Test of Equal or Given Proportions

c

{base}

Combine values/vectors into a vector

leveneTest

{car}

Computes Levene’s test for homogeneity of variance across groups.

The end!